//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Media;

namespace Microsoft.Research.ScientificWorkflow.TridentUtilities
{
    public static class IconUtilities
    {
        /// <summary>
        /// Creates the Image object
        /// </summary>
        /// <param name="imagePath">string path of the image</param>
        /// <returns>Image</returns>
        public static Image GetIcon(string imagePath)
        {
            Image headerImage = new Image();
            ImageSourceConverter converter = new ImageSourceConverter();
            headerImage.Source = (ImageSource)converter.ConvertFromString(imagePath);
            return headerImage;
        }
    }
}
